package com.autonavi.yunda.yunji.core.model.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.sql.Timestamp;

/**
 * @author cizhong.wcs
 * @date 2023/9/4 14:09
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "yunji_user_project_relation", autoResultMap = true)
public class UserProjectRelationDTO {
    @TableId(type = IdType.AUTO)
    private Long id;
    private String userId;
    private String projectId;
    private String createUser;
    private Timestamp createTime;

    public UserProjectRelationDTO(String userId, String projectId, String operator) {
        this.userId = userId;
        this.projectId = projectId;
        this.createUser = operator;
        this.createTime = new Timestamp(System.currentTimeMillis());
    }
}
